]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
mount-operation: Handle multi-line questions
authorRoss Lagerwall <rosslagerwall@gmail.com>
Thu, 5 Mar 2015 23:38:11 +0000 (23:38 +0000)
committerRoss Lagerwall <rosslagerwall@gmail.com>
Sun, 8 Mar 2015 11:31:44 +0000 (11:31 +0000)
Don't discard multiple lines when updating the message label.

https://bugzilla.gnome.org/show_bug.cgi?id=745713

js/ui/shellMountOperation.js

index a1cc81d5c3d594eb6b8ef2013620c238213125ca..522ae08562c4c25f84a7fd179e24f69a6260cf53 100644 (file)
@@ -49,9 +49,9 @@ function _setButtonsForChoices(dialog, choices) {
 function _setLabelsForMessage(dialog, message) {
     let labels = message.split('\n');
 
-    _setLabelText(dialog.subjectLabel, labels[0]);
-    if (labels.length > 1)
-        _setLabelText(dialog.descriptionLabel, labels[1]);
+    _setLabelText(dialog.subjectLabel, labels.shift());
+    if (labels.length > 0)
+        _setLabelText(dialog.descriptionLabel, labels.join('\n'));
 }
 
 function _createIcon(gicon) {